System and method for configuring an instrument to perform measurement functions utilizing conversion of graphical programs into hardware implementations

ABSTRACT

A system and method for configuring an instrument to perform measurement functions, wherein the instrument includes a programmable hardware element. A graphical program is first created, wherein the graphical program implements a measurement function. The graphical program may include a front panel and a block diagram. The method then generates a hardware description based on at least a portion of the graphical program. The hardware description describes a hardware implementation of the at least a portion of the graphical program. The method then configures the programmable hardware element in the instrument utilizing the hardware description to produce a configured hardware element. The configured hardware element thus implements a hardware implementation of the at least a portion of the graphical program. The instrument then acquires a signal from an external source, and the programmable hardware element in the instrument executes to perform the measurement function on the signal. The front panel may be used by a user to control the instrument during the measurement.

MICROFICHE APPENDIX

The present application includes two Microfiche Appendices. Appendix 1comprises 1 microfiche and 3 frames and Appendix 2 comprising 1microfiche and 13 frames.

RESERVATION OF COPYRIGHT

A portion of the disclosure of this patent document contains material towhich a claim of copyright protection is made. The copyright owner hasno objection to the facsimile reproduction by anyone of the patentdocument or the patent disclosure as it appears in the Patent andTrademark Office patent file or records, but reserves all other rightswhatsoever.

1. Field of the Invention

The present invention relates to graphical programming, and inparticular to a system and method for converting a graphical programinto a programmable hardware implementation.

2. Description of the Related Art

Traditionally, high level text-based programming languages have beenused by programmers in writing applications programs. Many differenthigh level programming languages exist, including BASIC, C, FORTRAN,Pascal, COBOL, ADA, APL, etc. Programs written in these high levellanguages are translated to the machine language level by translatorsknown as compilers. The high level programming languages in this level,as well as the assembly language level, are referred to as text-basedprogramming environments.

Increasingly computers are required to be used and programmed by thosewho are not highly trained in computer programming techniques. Whentraditional text-based programming environments are used, the user'sprogramming skills and ability to interact with the computer systemoften become a limiting factor in the achievement of optimal utilizationof the computer system.

There are numerous subtle complexities which a user must master beforehe can efficiently program a computer system in a text-basedenvironment. The task of programming a computer system to model aprocess often is further complicated by the fact that a sequence ofmathematical formulas, mathematical steps or other procedurescustomarily used to conceptually model a process often does not closelycorrespond to the traditional text-based programming techniques used toprogram a computer system to model such a process. In other words, therequirement that a user program in a text-based programming environmentplaces a level of abstraction between the user's conceptualization ofthe solution and the implementation of a method that accomplishes thissolution in a computer program. Thus, a user often must substantiallymaster different skills in order to both conceptually model a system andthen to program a computer to model that system. Since a user often isnot fully proficient in techniques for programming a computer system ina text-based environment to implement his model, the efficiency withwhich the computer system can be utilized to perform such modeling oftenis reduced.

Examples of fields in which computer systems are employed to modeland/or control physical systems are the fields of instrumentation,process control, and industrial automation. Computer modeling or controlof devices such as instruments or industrial automation hardware hasbecome increasingly desirable in view of the increasing complexity andvariety of instruments and devices available for use. However, due tothe wide variety of possible testing/control situations andenvironments, and also the wide array of instruments or devicesavailable, it is often necessary for a user to develop a program tocontrol a desired system. As discussed above, computer programs used tocontrol such systems had to be written in conventional text-basedprogramming languages such as, for example, assembly language, C,FORTRAN, BASIC, or Pascal. Traditional users of these systems, however,often were not highly trained in programming techniques and, inaddition, traditional text-based programming languages were notsufficiently intuitive to allow users to use these languages withouttraining. Therefore, implementation of such systems frequently requiredthe involvement of a programmer to write software for control andanalysis of instrumentation or industrial automation data. Thus,development and maintenance of the software elements in these systemsoften proved to be difficult.

U.S. Pat. No. 4,901,221 to Kodosky et al discloses a graphical systemand method for modeling a process, i.e. a graphical programmingenvironment which enables a user to easily and intuitively model aprocess. The graphical programming environment disclosed in Kodosky etal can be considered the highest and most intuitive way in which tointeract with a computer. A graphically based programming environmentcan be represented at level above text-based high level programminglanguages such as C, Pascal, etc. The method disclosed in Kodosky et alallows a user to construct a diagram using a block diagram editor, suchthat the diagram created graphically displays a procedure or method foraccomplishing a certain result, such as manipulating one or more inputvariables to produce one or more output variables. In response to theuser constructing a data flow diagram or graphical program using theblock diagram editor, machine language instructions are automaticallyconstructed which characterize an execution procedure which correspondsto the displayed procedure. Therefore, a user can create a computerprogram solely by using a graphically based programming environment.This graphically based programming environment may be used for creatingvirtual instrumentation systems, industrial automation systems andmodeling processes, as well as for any type of general programming.

Therefore, Kodosky et al teaches a graphical programming environmentwherein a user places on manipulates icons in a block diagram using ablock diagram editor to create a data flow “program.” A graphicalprogram for controlling or modeling devices, such as instruments,processes or industrial automation hardware, is referred to as a virtualinstrument (VI). In creating a virtual instrument, a user preferablycreates a front panel or user interface panel. The front panel includesvarious front panel objects, such as controls or indicators thatrepresent the respective input and output that will be used by thegraphical program or VI, and may include other icons which representdevices being controlled. When the controls and indicators are createdin the front panel, corresponding icons or terminals are automaticallycreated in the block diagram by the block diagram editor. Alternatively,the user can first place terminal icons in the block diagram which causethe display of corresponding front panel objects in the front panel. Theuser then chooses various functions that accomplish his desired result,connecting the corresponding function icons between the terminals of therespective controls and indicators. In other words, the user creates adata flow program, referred to as a block diagram, representing thegraphical data flow which accomplishes his desired function. This isdone by wiring up the various function icons between the control iconsand indicator icons. The manipulation and organization of icons in turnproduces machine language that accomplishes the desired method orprocess as shown in the block diagram.

A user inputs data to a virtual instrument using front panel controls.This input data propagates through the data flow block diagram orgraphical program and appears as changes on the output indicators. In aninstrumentation application, the front panel can be analogized to thefront panel of an instrument. In an industrial automation applicationthe front panel can be analogized to the MMI (Man Machine Interface) ofa device. The user adjusts the controls on the front panel to affect theinput and views the output on the respective indicators.

Thus, graphical programming has become a powerful tool available toprogrammers. Graphical programming environments such as the NationalInstruments LabVIEW product have become very popular. Tools such asLabVIEW have greatly increased the productivity of programmers, andincreasing numbers of programmers are using graphical programmingenvironments to develop their software applications. In particular,graphical programming tools are being used for test and measurement,data acquisition, process control, man machine interface (MMI), andsupervisory control and data acquisition (SCADA) applications, amongothers.

A primary goal of virtual instrumentation is to provide the user themaximum amount of flexibility to create his/her own applications and/ordefine his/her own instrument functionality. In this regard, it isdesirable to extend the level at which the user of instrumentation orindustrial automation hardware is able to program instrument. Theevolution of the levels at which the user has been able to program aninstrument is essentially as follows.

1. User level software (LabVIEW, LabWindows CVI, Visual Basic, etc.)

2. Kernel level software

3. Auxiliary kernel level software (a second kernel running along sidethe main OS, e.g., InTime, VentureCom, etc.)

4. Embedded kernel level software (U.S. patent application Ser. No.08/912,445, referenced above)

5. Hardware level software (FPGA—the present patent application)

In general, going down the above list, the user is able to createsoftware applications which provide a more deterministic real-timeresponse. Currently, most programming development tools forinstrumentation or industrial automation provide an interface at level 1above. In general, most users are unable and/or not allowed to programat the kernel level or auxiliary kernel level. The user level softwaretypically takes the form of software tools that can be used to createsoftware which operates at levels 1 and/or 4.

Current instrumentation solutions at level 5 primarily exist asvendor-defined solutions, i.e., vendor created modules. However, itwould be highly desirable to provide the user with the ability todevelop user level software which operates at the hardware level. Moreparticularly, it would be desirable to provide the user with the abilityto develop high level software, such as graphical programs, which canthen be readily converted into hardware level instrument functionality.This would provide the user with the dual benefits of being able toprogram instrument functionality at the highest level possible(text-based or graphical programs), while also providing the ability tohave the created program operate directly in hardware for increasedspeed and efficiency.

SUMMARY OF THE INVENTION

The present invention comprises a computer-implemented system and methodfor automatically generating hardware level functionality, e.g.,programmable hardware or FPGAs, in response to a graphical programcreated by a user. This provides the user the ability to develop ordefine instrument functionality using graphical programming techniques,while enabling the resulting program to operate directly in hardware.

The user first creates a graphical program which performs or representsthe desired functionality. The graphical program will typically includeone or more modules or a hierarchy of sub-VIs. In the preferredembodiment, the user places various constructs in portions of thegraphical program to aid in conversion of these portions into hardwareform.

The user then selects an option to convert the graphical program intoexecutable form, wherein at least a portion of the graphical program isconverted into a hardware implementation. According to one embodiment ofthe present invention, the user can select which portions of modules areto be translated into hardware form, either during creation of thegraphical program or when selecting the option to convert the graphicalprogram into executable form. Thus the user can select a first portionof the graphical program, preferably comprising the supervisory controland display portion of the program, to be compiled into machine languagefor execution on a CPU. According to the present invention, the user canselect a second portion of the graphical program which is desired forhardware implementation.

The portion of the graphical program selected for hardwareimplementation is first exported into a hardware description, such as aVHDL description. The hardware description is then converted into a netlist, preferably an FPGA-specific net list. The hardware description isconverted into a net list by a synthesis tool. The net list is thencompiled into a FPGA program file, also called a software bit stream. Inthe preferred embodiment, the hardware description is directly convertedinto an FPGA program file.

The step of compiling the resulting net list into an FPGA program filepreferably uses a library of pre-compiled function blocks to aid in thecompilation, as well as hardware target specific information. Thelibrary of pre-compiled function blocks includes net list libraries forstructure nodes, such as for/next loops, while/do loops, casestructures, and sequence structures, among others. This allows the userto program with high level programming constructs, such as iteration,looping, and case structures, while allowing the resulting program toexecute directly in hardware.

The resulting bit stream is then transferred to an FPGA to produce aprogrammed FPGA equivalent to the graphical program or block diagram.

The preferred embodiment of the invention comprises a general purposecomputer system which includes a CPU and memory, and an interface cardor device coupled to the computer system which includes programmablehardware or logic, such as an FPGA. The computer system includes agraphical programming system which is used to develop the graphicalprogram. The computer system also includes software according to thepresent invention which is operable to convert the graphical programinto a hardware description. The computer system further includes asynthesis tool which is used to compile the hardware description into anFPGA-specific net list, as well as other tools for converting the netlist into an FPGA program file for downloading into the FPGA. Thecomputer system further includes a library of pre-compiled functionblocks according to the present invention which are used by thesynthesis tool to aid in compiling the net list into the software bitstream.

In one embodiment, the target device including the reconfigurablehardware or FPGA being programmed comprises an interface card in thecomputer system, such as a data acquisition card, a GPIB interface card,or a VXI interface card. In an alternate embodiment, the target devicebeing programmed comprises an instrument or device connected to thecomputer, such as through a serial connection. It is noted that thetarget instrument or device being programmed, which includes an FPGA orother configurable hardware element, can take any of various forms, asdesired.

BRIEF DESCRIPTION OF THE DRAWINGS

A better understanding of the present invention can be obtained when thefollowing detailed description of the preferred embodiment is consideredin conjunction with the following drawings, in which:

FIG. 1 illustrates an instrumentation control system;

FIG. 1A illustrates an industrial automation system;

FIG. 2 is a block diagram of the instrumentation control system of FIG.1;

FIGS. 3, 3A and 3B are block diagrams illustrating an interface cardconfigured with programmable hardware according to various embodimentsof the present invention;

FIG. 4 is a flowchart diagram illustrating operation of the presentinvention;

FIG. 4A is a more detailed flowchart diagram illustrating operation ofthe preferred embodiment of the invention, including compiling a firstportion of the graphical program into machine language and converting asecond portion of the graphical program into a hardware implementation;

FIG. 5 is a more detailed flowchart diagram illustrating creation of agraphical program according to the preferred embodiment;

FIG. 6 is a more detailed flowchart diagram illustrating operation ofexporting at least a portion of a graphical program to a hardwaredescription;

FIG. 7 is a flowchart diagram illustrating operation where the methodexports an input terminal into a hardware description;

FIG. 8 is a flowchart diagram illustrating operation where the methodexports a function node into a hardware description;

FIG. 9 is a flowchart diagram illustrating operation where the methodexports an output terminal into a hardware description;

FIG. 10 is a flowchart diagram illustrating operation where the methodexports a structure node into a hardware description;

FIG. 11 illustrates converting a node hardware description to a netlist;

FIG. 12 illustrates converting a structure node hardware description toa net list;

FIG. 13 illustrates the function block for a structure node;

FIG. 14 is a state diagram illustrating operation of the structure nodefunction block of FIG. 13;

FIGS. 15 and 16 illustrate a simple example of operation of the presentinvention, wherein FIG. 15 illustrates a simple graphical program andFIG. 16 is a conceptual diagram of the hardware description of thegraphical program of FIG. 15; and

FIGS. 17-19 illustrate another example of operation of the presentinvention, wherein FIG. 17 illustrates a graphical program, FIG. 18illustrates a tree of data structures created in response to thegraphical program of FIG. 17, and FIG. 18 is a conceptual diagram of thehardware description of the graphical program of FIG. 17.

While the invention is susceptible to various modifications andalternative forms specific embodiments are shown by way of example inthe drawings and will herein be described in detail. It should beunderstood however, that drawings and detailed description thereto arenot intended to limit the invention to the particular form disclosed.But on the contrary the invention is to cover all modifications,equivalents and alternative following within the spirit and scope of thepresent invention as defined by the appended claims.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT Incorporation byReference

The following U.S. Patents and patent applications are herebyincorporated by reference in their entirety as though fully andcompletely set forth herein.

U.S. Pat. No. 4,901,221 titled “Graphical System for Modeling a Processand Associated Method,” issued on Feb. 13, 1990.

U.S. Pat. No. 4,914,568 titled “Graphical System for Modeling a Processand Associated Method,” issued on Apr. 3, 1990.

U.S. Pat. No. 5,481,741 titled “Method and Apparatus for ProvidingAttribute Nodes in a Graphical Data Flow Environment”.

U.S. patent application Ser. No. 08/292,091 filed Aug. 17, 1994, titled“Method and Apparatus for Providing Improved Type Compatibility and DataStructure Organization in a Graphical Data Flow Diagram”.

U.S. Pat. No. 5,475,851 titled “Method and Apparatus for Improved Localand Global Variable Capabilities in a Graphical Data Flow Program”.

U.S. Pat. No. 5,497,500 titled “Method and Apparatus for More EfficientFunction Synchronization in a Data Flow Program”.

U.S. patent application No. 08/474,307 titled “Method and Apparatus forProviding Stricter Data Type Capabilities in a Graphical Data FlowEnvironment” filed Jun. 7, 1995.

U.S. Pat. No. 5,481,740 titled “Method and Apparatus for ProvidingAutoprobe Features in a Graphical Data Flow Diagram”.

U.S. patent application Ser. No. 08/870,262 titled “System and Methodfor Detecting Differences in Graphical Programs” filed Jun. 6, 1997,whose inventor is Ray Hsu.

U.S. patent application Ser. No. 08/912,445 titled “Embedded GraphicalProgramming System” filed Aug. 18, 1997, whose inventors are Jeffrey L.Kodosky, Darshan Shah, Samson DeKey, and Steve Rogers.

The above-referenced patents and patent applications disclose variousaspects of the LabVIEW graphical programming and development system.

The LabVIEW and BridgeVIEW graphical programming manuals, including the“G Programming Reference Manual”, available from National InstrumentsCorporation, are also hereby incorporated by reference in theirentirety.

Appendices

The present application includes several source code appendices.

Appendix 1 comprises the graphical source code of a graphical program orVI called example1.vi.

Appendix 2 comprises a VHDL hardware description created from thegraphical program example1.vi shown in Appendix 1, wherein the VHDLhardware description of Appendix 2 was directly generated from theLabVIEW program example1.vi using the present invention.

FIGS. 1 and 1A—Instrumentation and Industrial Automation Systems

Referring now to FIG. 1, an instrumentation control system 100 is shown.The system 100 comprises a computer 102 which connects to one or moreinstruments. The computer 102 comprises a CPU, a display screen, memory,and one or more input devices such as a mouse or keyboard as shown. Thecomputer 102 connects through the one or more instruments to analyze,measure or control a unit under test (UUT) or process 130.

The one or more instruments may include a GPIB instrument 112, a dataacquisition board 114, and/or a VXI instrument 116. The GPIB instrument112 is coupled to the computer 102 via a GPIB interface card 122provided by the computer 102. The data acquisition board 114 is coupledto the computer 102, and preferably interfaces through signalconditioning circuitry 124 to the UUT. The signal conditioning circuitry124 preferably comprises an SCXI (Signal Conditioning eXtensions forInstrumentation) chassis comprising one or more SCXI modules 126. Boththe GPIB card 122 and the DAQ card 114 are typically plugged in to anI/O slot in the computer 102, such as a PCI bus slot, a PC Card slot, oran ISA, EISA or MicroChannel bus slot provided by the computer 102.However, these cards 122 and 114 are shown external to computer 102 forillustrative purposes. The VXI instrument 116 is coupled to the computer102 via a VXI bus, MXI bus, or other serial or parallel bus provided bythe computer 102. The computer 102 preferably includes VXI interfacelogic, such as a VXI, MXI or GPIB interface card (not shown) comprisedin the computer. A serial instrument (not shown) may also be coupled tothe computer 102 through a serial port, such as an RS-232 port, USB(Universal Serial bus) or IEEE 1394 or 1394.2 bus, provided by thecomputer 102. In typical instrumentation control systems an instrumentwill not be present of each interface type, and in fact many systems mayonly have one or more instruments of a single interface type, such asonly GPIB instruments.

In the embodiment of FIG. 1, one or more of the devices connected to thecomputer 102 include programmable or reconfigurable hardware accordingto the present invention. For example, one or more of the GPIB card 122,the DAQ card 114, or the VXI card include programmable hardwareaccording to the present invention. Alternatively, or in addition, oneor more of the GPIB instrument 112, the VXI instrument 116, or theserial instrument include programmable hardware according to the presentinvention. In the preferred embodiment, the programmable hardwarecomprises an FPGA (field programmable gate array).

The instruments are coupled to the unit under test (UUT) or process 130,or are coupled to receive field signals, typically generated bytransducers. The system 100 may be used in a data acquisition andcontrol application, in a test and measurement application, a processcontrol application, or a man-machine interface application.

Referring now to FIG. 1A, an industrial automation system 140 is shown.The industrial automation system 140 is similar to the instrumentationor test and measurement system 100 shown in FIG. 1. Elements which aresimilar or identical to elements in FIG. 1 have the same referencenumerals for convenience. The system 140 comprises a computer 102 whichconnects to one or more devices or instruments. The computer 102comprises a CPU, a display screen, memory, and one or more input devicessuch as a mouse or keyboard as shown. The computer 102 connects throughthe one or more devices to a process or device 160 to perform anautomation function, such as MMI (Man Machine Interface), SCADA(Supervisory Control and Data Acquisition), portable or distributedacquisition, advanced analysis, or control.

The one or more devices may include a data acquisition board 114, aserial instrument 142, a PLC (Programmable Logic Controller) 144, or afieldbus network card 156. The data acquisition board 114 is coupled toor comprised in the computer 102, and preferably interfaces throughsignal conditioning circuitry 124 to the process 160. The signalconditioning circuitry 124 preferably comprises an SCXI (SignalConditioning extensions for Instrumentation) chassis comprising one ormore SCXI modules 126. The serial instrument 142 is coupled to thecomputer 102 through a serial interface card 152, or through a serialport, such as an RS-232 port, provided by the computer 102. The PLC 144couples to the computer 102 through a serial port, Ethernet port, or aproprietary interface. The fieldbus interface card 156 is preferablycomprised in the computer 102 and interfaces through a fieldbus networkto one or more fieldbus devices, such as valve 146. Each of the DAQ card114, the serial card 152 and the fieldbus card 156 are typically pluggedin to an I/O slot in the computer 102 as described above. However, thesecards 114, 12 and 156 are shown external to computer 102 forillustrative purposes. In typical industrial automation systems a devicewill not be present of each interface type, and in fact many systems mayonly have one or more devices of a single interface type, such as onlyPLCs. The devices are coupled to the device or process 160.

In the embodiment of FIG. 1A, one or more of the devices connected tothe computer 102 include programmable hardware according to the presentinvention. For example, one or more of the data acquisition board 114,the serial instrument 142, the serial interface card 152, the PLC 144,or the fieldbus network card 156 include programmable hardware accordingto the present invention. In the preferred embodiment, the programmablehardware comprises an FPGA (field programmable gate array).

Referring again to FIGS. 1 and 1A, the computer 102 preferably includesa memory media, such as a magnetic media, CD-ROM, or floppy disks 104.The memory media preferably stores a graphical programming developmentsystem for developing graphical programs. The memory media also storescomputer programs according to the present invention which areexecutable to convert at least a portion of a graphical program into aform for configuring or programming the programmable hardware or FPGA.The present invention includes a software program stored on a memoryand/or hard drive of the computer 102 and executed by a CPU of thecomputer 102. The CPU executing code and data from the memory thuscomprises a means for converting graphical code into a hardwareimplementation according to the steps described below.

The instruments or devices in FIGS. 1 and 1A are controlled by graphicalsoftware programs, optionally a portion of which execute on the CPU ofthe computer 102, and at least a portion of which are downloaded to theprogrammable hardware for hardware execution. The graphical softwareprograms which perform data acquisition, analysis and/or presentation,e.g., for instrumentation control or industrial automation, are referredto as virtual instruments.

In the preferred embodiment, the present invention is comprised in theLabVIEW or BridgeVIEW graphical programming systems, hereaftercollectively referred to as LabVIEW, available from NationalInstruments. Also, in the preferred embodiment, the term “LabVIEW” isintended to include graphical programming systems which include Gprogramming functionality, i.e., which include at least a portion ofLabVIEW graphical programming functionality, including the BridgeVIEWgraphical programming system.

Also, the term “graphical programming system” is intended to include anyof various types of systems which are used to develop or creategraphical code or graphical programs, including LabVIEW and BridgeVIEWfrom National Instruments, Visual Designer from IntelligentInstrumentation, Hewlett-Packard's VEE (Visual Engineering Environment),Snap-Master by HEM Data Corporation, DASYLab by DasyTec, GFS DiaDem, andObjectBench by SES (Scientific and Engineering Software), among others.

Although in the preferred embodiment the graphical programs andprogrammable hardware are involved with data acquisition/generation,analysis, and/or display, and for controlling or modelinginstrumentation or industrial automation hardware, it is noted that thepresent invention can be used to create hardware implementations ofgraphical programs for a plethora of applications and are not limited toinstrumentation or industrial automation applications. In other words,FIGS. 1 and 1A are exemplary only, and the present invention may be usedin any of various types of systems. Thus, the system and method of thepresent invention is operable for automatically creating hardwareimplementations of graphical programs or graphical code for any ofvarious types of applications, including general purpose softwareapplications such as word processing, spreadsheets, network control,games, etc.

Computer Block Diagram

Referring now to FIG. 2, a block diagram of the computer 102 (of FIG. 1)is shown. The elements of a computer not necessary to understand theoperation of the present invention have been omitted for simplicity. Thecomputer 102 includes at least one central processing unit or CPU 160which is coupled to a processor or host bus 162. The CPU 160 may be anyof various types, including an x86 processor, a PowerPC processor, a CPUfrom the Motorola family of processors, a CPU from the SPARC family ofRISC processors, as well as others. Main memory 166 is coupled to thehost bus 162 by means of memory controller 164. The main memory 166stores a graphical programming system, and also stores software forconverting at least a portion of a graphical program into a hardwareimplementation. This software will be discussed in more detail below.The main memory 166 also stores operating system software as well as thesoftware for operation of the computer system, as well known to thoseskilled in the art.

The host bus 162 is coupled to an expansion or input/output bus 170 bymeans of a bus controller 168 or bus bridge logic. The expansion bus 170is preferably the PCI (Peripheral Component Interconnect) expansion bus,although other bus types can be used. The expansion bus 170 includesslots for various devices such as the data acquisition board 114 (ofFIG. 1), a GPIB interface card 122 which provides a GPIB bus interfaceto the GPIB instrument 112 (of FIG. 1), and a VXI or MXI bus card 230coupled to the VXI chassis 116 for receiving VXI instruments. Thecomputer 102 further comprises a video display subsystem 180 and harddrive 182 coupled to the expansion bus 170.

One or more of the interface cards or devices coupled to the expansionbus, such as the DAQ card 114, the GPIB interface card 122, the GPIBinstrument 112, or the VXI or MXI bus card 230 comprises an embeddedsystem comprising an embedded CPU and embedded memory.

Programmable Hardware Diagram

Referring now to FIG. 3, a block diagram illustrating an interface cardconfigured with programmable hardware according to the present inventionis shown. It is noted that FIG. 3 is exemplary only, and an interfacecard or device configured with programmable hardware according to thepresent invention may have various architectures or forms, as desired.The interface card illustrated in FIG. 3 is the DAQ interface card 114shown in either of FIGS. 1 or 1A. However, as noted above, theprogrammable hardware may be included on any of the various devicesshown in FIGS. 1 or 1A, or on other devices, as desired.

As shown, the interface card 114 includes an I/O connector 202 which iscoupled for receiving signals. In the embodiments of FIGS. 1 and 1A, theI/O connector 202 presents analog and/or digital connections forreceiving/providing analog or digital signals. The I/O connector 202 isadapted for coupling to SCXI conditioning logic 124 and 126, or isadapted to be coupled directly to a unit under test 130 or process 160.

The interface card 114 also includes data acquisition (DAQ) logic 204.As shown, the data acquisition logic 204 comprises analog to digital(A/D) converters, digital to analog (D/A) converters, timer counters(TC) and signal conditioning (SC) logic as shown. The DAQ logic 204provides the data acquisition functionality of the DAQ card 114.

According to the preferred embodiment of the invention, the interfacecard 114 includes a programmable hardware element or programmableprocessor 206. In the preferred embodiment, the programmable hardware206 comprises a field programmable gate array (FPGA) such as thoseavailable from Xilinx, Altera, etc. The programmable hardware element206 is coupled to the DAQ logic 204 and is also coupled to the local businterface 208. Thus a graphical program can be created on the computer102, or on another computer in a networked system, and at least aportion of the graphical program can be converted into a hardwareimplementation form for execution in the FPGA 206. The portion of thegraphical program converted into a hardware implementation form ispreferably a portion which requires fast and/or real-time execution.

In the embodiment of FIG. 3, the interface card 114 further includes adedicated on-board microprocessor 212 and memory 214. This enables aportion of the graphical program to be compiled into machine languagefor storage in the memory 214 and execution by the microprocessor 212.This is in addition to a portion of the graphical program beingconverted into a hardware implementation form in the FPGA 206. Thus, inone embodiment, after a graphical program has been created, a portion ofthe graphical program is compiled for execution on the embedded CPU 212and executes locally on the interface card 114 via the CPU 212 andmemory 214, and a second portion of the graphical program is translatedor converted into a hardware executable format and downloaded to theFPGA 206 for hardware implementation.

As shown, the interface card 114 further includes bus interface logic216 and a control/data bus 218. In the preferred embodiment, theinterface card 114 is a PCI bus-compliant interface card adapted forcoupling to the PCI bus of the host computer 102, or adapted forcoupling to a PXI (PCI eXtensions for Instrumentation) bus. The businterface logic 216 and the control/data bus 218 thus present a PCI orPXI interface.

The interface card 114 also includes local bus interface logic 208. Inthe preferred embodiment, the local bus interface logic 208 presents aRTSI (Real Time System Integration) bus for routing timing and triggersignals between the interface card 114 and one or more other devices orcards.

In the embodiment of FIG. 3A, the CPU 212 and memory 214 are notincluded on the interface card 114, and thus only the portion of thegraphical program which is converted into hardware implementation formis downloaded to the FPGA 206. Thus in the embodiment of FIG. 3A, anysupervisory control portion of the graphical program which is necessaryor desired to execute in machine language on a programmable CPU isexecuted by the host CPU in the computer system 102, and is not executedlocally by a CPU on the interface card 114.

In the embodiment of FIG. 3B, the CPU 212 is not included on theinterface card 114, i.e., the interface card 114 includes the FPGA 206and the memory 214. In this embodiment, the memory 214 is used forstoring FPGA state information. FIG. 3B is the currently preferredembodiment of the present invention.

FIG. 4—Conversion of Graphical Code into a Hardware Implementation

Referring now to FIG. 4, a flowchart diagram is shown illustratingoperation of the preferred embodiment of the present invention. Thepresent invention comprises a computer-implemented method for generatinghardware implementations of graphical programs or graphical code. It isnoted that various of the steps in the flowcharts below can occurconcurrently or in different orders.

The method below presumes that a graphical programming developmentsystem is stored in the memory of the computer system for creation ofgraphical programs. In the preferred embodiment, the graphicalprogramming system is the LabVIEW graphical programming system availablefrom National Instruments. In this system, the user creates thegraphical program in a graphical program panel, referred to as a blockdiagram window and also creates a user interface in a graphical frontpanel. The graphical program is sometimes referred to as a virtualinstrument (VI). The graphical program or VI will typically have ahierarchy of sub-graphical programs or sub-VIs.

As shown, in step 302 the user first creates a graphical program, alsosometimes referred to as a block diagram. In the preferred embodiment,the graphical program comprises a graphical data flow diagram whichspecifies functionality of the program to be performed. This graphicaldata flow diagram is preferably directly compilable into machinelanguage code for execution on a computer system.

In step 304 the method operates to export at least a portion of thegraphical program to a hardware description. Thus, after the user hascreated a graphical program in step 302, the user selects an option toexport a portion of the graphical program to a hardware description. Thehardware description is preferably a VHDL description, e.g., a VHDLsource file, or alternatively is a high level net list description. Thehardware description comprises a high level hardware description offunction blocks, logic, inputs, and outputs which perform the operationindicated by the graphical program. The operation of exporting at leasta portion of a the graphical program to a hardware description isdiscussed in more detail with the flowchart of FIG. 6.

In one embodiment, during creation of the graphical program in step 302the user specifies portions, e.g. sub VIs, which are to be exported tothe hardware description format for conversion into hardwareimplementation. In another embodiment, when the user selects the optionto export a portion of the graphical program to the hardware descriptionformat, the user selects which modules or sub-VIs at that time which areto be exported to the hardware description.

In step 306 the method operates to convert the hardware description intoan FPGA-specific net list. The net list describes the componentsrequired to be present in the hardware as well as theirinterconnections. Conversion of the hardware description into theFPGA-specific net list is preferably performed by any of various typesof commercially available synthesis tools, such as those available fromXilinx, Altera, etc.

In the preferred embodiment, the converting step 306 may utilize one ormore pre-compiled function blocks from a library of pre-compiledfunction blocks 308. Thus, for certain function blocks which aredifficult to compile, or less efficient to compile, from a hardwaredescription into a net list format, the hardware description created instep 304 includes a reference to a pre-compiled function block from thelibrary 308. The respective pre-compiled function blocks are simplyinserted into the net list in place of these references in step 306. Thepreferred embodiment of the invention thus includes the library 308 ofpre-compiled function blocks which are used in creating the net list.The preferred embodiment also includes hardware target specificinformation 310 which is used by step 306 in converting the hardwaredescription into a net list which is specific to a certain type or classof FPGA.

In step 312 the method operates to compile the net list into an FPGAprogram file, also referred to as a software bit stream. The FPGAprogram file is a file that can be readily downloaded to program anFPGA.

After the net list has been compiled into an FPGA program file in step312, then in step 314 the method operates to transfer the FPGA programfile to the programmable hardware, e.g., the FPGA, to produce aprogrammed hardware equivalent to the graphical program. Thus, uponcompletion of step 314, the portion of a graphical program referenced instep 304 is comprised as a hardware implementation in an FPGA or otherprogrammable hardware element.

It is noted that various of the above steps can be combined and/or canbe made to appear invisible to the user. For example, steps 306 and 312can be combined into a single step, as can steps 304 and 306. In thepreferred embodiment, after the user creates the graphical program instep 302, the user simply selects a hardware export option and indicatesthe hardware target or destination, causing steps 304-314 to beautomatically performed.

FIG. 4A—Conversion of a Graphical Program into Machine Language andHardware Implementations

FIG. 4A is a more detailed flowchart diagram illustrating operation ofthe preferred embodiment of the invention, including compiling a firstportion of the graphical program into machine language and converting asecond portion of the graphical program into a hardware implementation.

As shown in FIG. 4A, after the user has created a graphical program instep 302, the user can optionally select a first portion to be compiledinto machine code for CPU execution as is normally done. In thepreferred embodiment, the user preferably selects a supervisory controland display portion of the graphical program to be compiled into machinecode for a CPU execution. The first portion comprising supervisorycontrol and display portions is compiled for execution on a CPU, such asthe host CPU in the computer 102 or the CPU 212 comprised on theinterface card 114. This enables the supervisory control and displayportions to execute on the host CPU, which is optimal for these elementsof the program.

The user selects a second portion for conversion to hardwareimplementation, which is performed as described above in steps 304-314of FIG. 4. The portion of the graphical program which is desired forhardware implementation preferably comprises modules or VIs whichrequire a fast or deterministic implementation and/or are desired toexecute in a stand-alone hardware unit. In general, portions of thegraphical program which are desired to have a faster or moredeterministic execution are converted into the hardware implementation.In one embodiment, the entire graphical program is selected forconversion to a hardware implementation, and thus step 322 is notperformed.

FIG. 5—Creation of a Graphical Program

FIG. 5 is a more detailed flowchart diagram of step 302 of FIGS. 4 and4A, illustrating creation of a graphical program according to thepreferred embodiment of the invention. As shown, in step 342 the userarranges on the screen a graphical program or block diagram. Thisincludes the user placing and connecting, e.g., wiring, various icons ornodes on the display screen in order to configure a graphical program.More specifically, the user selects various function icons or othericons and places or drops the icons in a block diagram panel, and thenconnects or “wires up” the icons to assemble the graphical program. Theuser also preferably assembles a user interface, referred to as a frontpanel, comprising controls and indicators which indicate or representinput/output to/from the graphical program. For more information oncreating a graphical program in the LabVIEW graphical programmingsystem, please refer to the LabVIEW system available from NationalInstruments as well as the above patent applications incorporated byreference.

In response to the user arranging on the screen a graphical program, themethod operates to develop and store a tree of data structures whichrepresent the graphical program. Thus, as the user places and arrangeson the screen function nodes, structure nodes, input/output terminals,and connections or wires, etc., the graphical programming systemoperates to develop and store a tree of data structures which representthe graphical program. More specifically, as the user assembles eachindividual node and wire, the graphical programming system operates todevelop and store a corresponding data structure in the tree of datastructures which represents the individual portion of the graphicalprogram that was assembled. Thus, steps 342 and 344 are an iterativeprocess which are repetitively performed as the user creates thegraphical program.

FIG. 6—Exporting a Portion of the Graphical Program to a HardwareDescription

FIG. 6 is a flowchart diagram of step 304 of FIGS. 4 and 4A,illustrating operation when the method exports a portion of thegraphical program into a hardware description. The tree of datastructures created and stored in step 344 preferably comprises ahierarchical tree of data structures based on the hierarchy andconnectivity of the graphical program. As shown, in step 362 the methodtraverses the tree of data structures and in step 364 the methodoperates to translate each data structure into a hardware descriptionformat. In one embodiment, the method first flattens the tree of datastructures prior to traversing the tree in step 362.

In the present embodiment, a number of different function icons and/orprimitives can be placed in a diagram or graphical program forconversion into a hardware implementation. These primitives include, butare not limited to, function nodes, constants, global variables, controland indicator terminals, structure nodes, and sub-VIs, etc. Functionicons or primitives can be any data type, but in the current embodimentare limited to Integer or Boolean data types. Also, global variables arepreferably comprised on a single global panel for convenience. If a VIappears multiple times, then the VI is preferably re-entrant and mayhave state information. If a VI is not re-entrant, then preferablymultiple copies of the VI are created in hardware if the VI has no stateinformation, otherwise it would be an error.

In the preferred embodiment, each node which is converted to a hardwaredescription includes an Enable input, a Clear_Enable signal input, amaster clock signal input and an Enable_Out or Done signal. The Enableinput guarantees that the node executes at the proper time, i.e., whenall of its inputs have been received. The Clear_Enable signal input isused to reset the node if state information remembers that the node wasdone. The Enable_Out or Done signal is generated when the node completesand is used to enable operation of subsequent nodes which receive anoutput from the node. Each node which is converted to a hardwaredescription also includes the data paths depicted in the graphicalprogram.

For While loop structures, Iteration structures, Sequence structures,and Case Structures, the respective structure is essentially abstractedto a control circuit or control block. The control block includes adiagram enable out for each sub-diagram and a diagram done input foreach sub-diagram.

In addition to the above signals, e.g., the Enable input, theClear_Enable signal input, the master clock signal input, and theEnable_Out or Done signal, all global variables have numerous additionalsignals, including CPU interface signals which are specific to the typeof CPU and bus, but typically include data lines, address lines, clock,reset and device select signals. All VIs and sub-VIs also include CPUinterface signals if they contain a global variable.

In the preferred embodiment, when an icon is defined for a VI usedsolely to represent a hardware resource connected to the FPGA, e.g., anA/D converter, with a number of inputs and outputs, a string control ispreferably placed on the front panel labeled VHDL. In this case, thedefault text of the string control is placed in the text file createdfor the VHDL of the VI. Thus, in one embodiment, a library of VIs areprovided each representing a physical component or resource available inor to the FPGA. As these VHDL files representing these VIs are used, themethod of the present invention monitors their usage to ensure that eachhardware resource is used only once in the hierarchy of VIs beingexported to the FPGA. When the VHDL file is written, the contents of thestring control are used to define the access method of that hardwareresource.

The following is pseudo-code which describes the operations performed inthe flowchart of FIG. 6:

GenCircuit (vi)

send GenCircuit to top level diagram of vi

Diagram:GenCircuit(d)

send GenCircuit to each constant in d

send GenCircuit to each node in d

send GenCircuit to each signal in d

Signal: GenCircuit(s)

declare type of signal s

BasicNode:GenCircuit(n)

declare type of component needed for n

declare AND-gate for enabling n (if needed)

list connections for all node inputs

list connections for all inputs to enabling AND-gate (if needed)

Constant:GenCircuit(c)

declare type and value of constant c

WhileLoopNode:GenCircuit(n)

declare while loop controller component

declare AND-gate for enabling n (if needed)

list connections for all node inputs

list connections for all inputs to enabling AND-gate (if needed)

declare type of each shift register component

list connections for all inputs to all shift registers

declare type of each tunnel component

list connections for all inputs to all tunnels

CaseSelectNode:GenCircuit (n)

declare case select controller component

declare AND-gate for enabling n (if needed)

list connections for all node inputs

list connections for all inputs to enabling AND-gate (if needed)

declare type of each tunnel component

list connections for all inputs to all tunnels

SequenceNode:GenCircuit (n)

declare sequence controller component

declare AND-gate for enabling n (if needed)

list connections for all node inputs

list connections for all inputs to enabling AND-gate (if needed)

declare type of each tunnel component

list connections for all inputs to all tunnels

SubVINode:GenCircuit (n)

send GenCircuit to the subVI of n

associate inputs & outputs of subVI with those of n

declare AND-gate for enabling n (if needed)

list connections for all node inputs

list connections for all inputs to enabling AND-gate (if needed)

Referring to the above pseudo code listing, the method starts at the VIlevel (the top level) and begins generation of VHDL by sending a messageto the top level diagram. The method in turn effectively provides amessage from the diagram to each constant, each node, and each signal inthe diagram.

For signals, the method then declares the signal type.

For basic nodes, the method declares a type of the component needed, andalso declare an AND-gate with the proper number of inputs needed inorder to enable itself. In other words, basic nodes declare an AND-gatewith a number of inputs corresponding to the number of inputs receivedby the node. Here, optimization is preferably performed to minimize thenumber of inputs actually needed. For example, if a node has threeinputs, the node does not necessarily need a three input AND-gate if twoof those inputs are coming from a single node. As another example, ifone input comes from node A and another input comes from node B, butnode A also feeds node B, then the input from node A is not needed inthe AND gate. Thus various types of optimization are performed to reducethe number of inputs to each AND gate. For the basic node, the methodalso lists the connections for all of its inputs as well as theconnections for all inputs to the enabling AND-gate.

For a constant, the method simply declares the type and the value of theconstant.

For a While loop, the method declares a While loop controller component.The method also declares an AND-gate, lists AND-gate inputs, and listsnode inputs in a similar manner to the basic node described above. Themethod then declares the type for each shift register and includes acomponent for the shift register, and lists all the connections for theshift register inputs. If any tunnels are present on the While loop, themethod declares the type of each tunnel component and list theconnections for the inputs to the tunnels. For most tunnels, the methodsimply equivalences the signals for the inside and outside, without anyeffect.

The method proceeds in a similar manner for Case and Sequencestructures. For Case and Sequence structures, the method declares a caseselect controller component or a sequence controller component,respectively. For both Case and Sequence structures, the method alsodeclares an AND-gate, lists AND-gate inputs, and lists node inputs in asimilar manner to the basic node described above. The method thendeclares the component needed for any tunnels and list the connectionsfor the inputs to the tunnels.

For a sub-VI, the method sends a message to the sub-VI and associatesinputs and outputs of the sub-VI with those of n. The method thendeclares an AND-gate, lists AND-gate inputs, and lists node inputs in asimilar manner to the basic node described above.

FIG. 7—Exporting an Input Terminal into a Hardware Description

FIG. 7 is a flowchart diagram illustrating operation when the methodexports an input terminal into the hardware description format. Asshown, in step 402 the method determines if the data provided to theinput terminal is input from a portion of the graphical program whichwill be executing on the CPU, i.e., the portion of the graphical programwhich is to be compiled into machine language for execution on the CPU,or whether the data is input from another portion of the graphicalprogram that is also being transformed into a hardware implementation.

As shown, if the data input to the input terminal is determined in step402 to be input from a portion of the graphical program being compiledfor execution on the CPU, in step 406 the method creates a hardwaredescription of a write register with a data input and data and controloutputs. The write register is operable to receive data transferred bythe host computer, i.e., generated by the compiled portion executing onthe CPU. In step 408 the data output of the write register is connectedfor providing data output to other elements in the graphical programportion. In step 408 the control output of the write register isconnected to other elements in the graphical program portion forcontrolling sequencing of execution, in order to enable the hardwaredescription to have the same or similar execution order as the graphicalprogram.

If the data is determined to not be input from a portion being compiledfor execution on the CPU step in 402, i.e., the data is from anothernode in the portion being converted into a hardware implementation, thenin step 404 the method ties the data output from the prior node intothis portion of the hardware description, e.g., ties the data outputfrom the prior node into the input of dependent sub-modules as well ascontrol path logic to maintain the semantics of the original graphicalprogram.

FIG. 8—Exporting a Function Node into a Hardware Description

FIG. 8 is a flowchart diagram illustrating operation where the methodexports a function node into the hardware description format. In thepreferred embodiment, the term “function node” refers to any varioustypes of icons or items which represent a function being performed.Thus, a function node icon represents a function being performed in thegraphical program. Examples of function nodes include arithmeticfunction nodes, e.g., add, subtract, multiply, and divide nodes,trigonometric and logarithmic function nodes, comparison function nodes,conversion function nodes, string function nodes, array and clusterfunction nodes, file I/O function nodes, etc.

As shown in FIG. 8, in step 422 the method determines the inputs andoutputs of the function node. In step 424 the method creates a hardwaredescription of the function block corresponding to the function nodewith the proper number of inputs and outputs as determined in step 422.Alternatively, in step 424 the method includes a reference in thehardware description to a pre-compiled function block from the library308. In this case, the method also includes the determined number ofinputs and outputs of the function node.

In step 426 the method traverses the input dependencies of the node todetermine which other nodes provide outputs that are provided as inputsto the function node being converted. In step 428 the method creates ahardware description of an N input AND gate, wherein N is the number ofinputs to the node, with each of the N inputs connected to controloutputs of nodes which provide inputs to the function node. The outputof the AND gate is connected to a control input of the function blockcorresponding to the function node.

In the data flow diagramming model of the preferred embodiment, afunction node can only execute when all of its inputs have beenreceived. The AND gate created in step 428 emulates this function byreceiving all control outputs of nodes which provide inputs to thefunction node. Thus the AND gate operates to effectively receive all ofthe dependent inputs that are connected to the function node and ANDthem together to provide an output control signal which is determinativeof whether the function node has received all of its inputs. The outputof the AND gate is connected to the control input of the function blockand operates to control execution of the function block. Thus, thefunction block does not execute until the AND gate output provided tothe control input of the function block provides a logic signalindicating that all dependent inputs which are input to the functionnode have been received.

FIG. 9—Exporting an Output Terminal into a Hardware Description

FIG. 9 is a flowchart diagram illustrating operation where the methodexports an output terminal into the hardware description. As shown, instep 440 the method determines if the data provided from the outputterminal is output to a portion of the graphical program which will beexecuting on the CPU, i.e., the portion of the graphical program whichis to be compiled into machine language for execution on the CPU, orwhether the data is output to another portion of the graphical programthat is also being transformed into a hardware implementation.

As shown, if the data output from the output terminal is determined instep 440 to be output to a portion of the graphical program beingcompiled for execution on the CPU, then in step 442 the method creates ahardware description of a read register with a data input and data andcontrol outputs. The read register is operable to receive data generatedby logic representing a prior node in the graphical program.

In step 444 the method connects the data output of a prior node to thedata input of the read register. In step 444 the control input of theread register is also connected to control sequencing of execution,i.e., to guarantee that the read register receives data at the propertime. This enables the hardware description to have the same or similarexecution order as the graphical program.

If the data is determined to not be output to a portion being compiledfor execution on the CPU step in 440, i.e., the data is to another nodein the portion being converted into a hardware implementation, then instep 446 the method ties the data output from the output terminal into asubsequent node in this portion of the hardware description, e.g., tiesthe data output from the output terminal into the input of subsequentsub-modules as well as control path logic to maintain the semantics ofthe original graphical program.

FIG. 10—Exporting a Structure Node into a Hardware Description

FIG. 10 is a flowchart diagram illustrating operation where the methodexports a structure node into the hardware description. In the preferredembodiment, the term “structure node” refers to a node which representscontrol flow of data, including iteration, looping, sequencing, andconditional branching. Examples of structure nodes include For/Nextloops, While/Do loops, Case or Conditional structures, and Sequencestructures. For more information on structure nodes, please see theabove LabVIEW patents referenced above.

The flowchart of FIG. 10 illustrates exporting a loop structure nodeinto a hardware description. As shown, in step 462 the method examinesthe structure node parameters, e.g., the iteration number, loopcondition, period, phase delay, etc. As discussed above, the graphicalprogramming system preferably allows the user to insert certainparameters into a structure node to facilitate exporting the structurenode into a hardware description. Iteration and looping structure nodeshave previously included an iteration number and loop condition,respectively. According to the preferred embodiment of the invention,these structure nodes further include period and phase delay parameters,which are inserted into or assigned to the structure node. These provideinformation on the period of execution and the phase delay of thestructure node. As discussed below, the period and phase delayparameters, as well as the iteration number or loop condition, are usedto facilitate exporting the structure node into a hardware description.

In step 464, the method inserts the structure node parameters into thehardware description. In step 466 the method inserts a reference to apre-compiled function block corresponding to the type of structure node.In the case of a looping structure node, the method inserts a referenceto a pre-compiled function block which implements the looping functionindicated by the structure node. The method also connects controls tothe diagram enclosed by the structure node.

FIG. 11—Converting a Node into a Hardware Description

FIG. 11 is a flowchart diagram of a portion of step 306 of FIGS. 4 and4A, illustrating operation where the method converts the hardwaredescription for a node into a net list. FIG. 11 illustrates operation ofconverting a hardware description of a node, wherein the hardwaredescription comprises a reference to a function block and may includenode parameters. It is noted that where the hardware description of anode comprises a description of the actual registers, gates, etc. whichperform the operation of the node, then conversion of this hardwaredescription to a net list is readily performed using any of varioustypes of synthesis tools.

As shown, in step 502 the method examines the function block referenceand any node parameters present in the hardware description. In step504, the method selects the referenced pre-compiled function block fromthe library 308, which essentially comprises a net list describing thefunction block. In step 506 the method then configures the pre-compiledfunction block net list with any parameters determined in step 502. Instep 508 the method then inserts the configured pre-compiled functionblock into the net list which is being assembled.

FIG. 12—Converting a Structure Node into a Hardware Description

FIG. 12 is a flowchart diagram illustrating operation of the flowchartof FIG. 11, where the method converts the hardware description for astructure node into a net list. FIG. 12 illustrates operation ofconverting a hardware description of a structure node, wherein thehardware description comprises a reference to a structure node functionblock and includes structure node parameters.

As shown, in step 502A the method examines the function block referenceand the structure node parameters present in the hardware description.The structure node parameters may include parameters such as theiteration number, loop condition, period, phase delay, etc. In step 504Athe method selects the referenced pre-compiled function block from thelibrary 308, which essentially is a net list describing the structurenode function block. In step 506A the method then configures thepre-compiled function block net list with the structure node parametersdetermined in step 502A. This involves setting the period and phasedelay of execution of the structure node as well as any other parameterssuch as iteration number, loop condition, etc. In step 508A the methodthen inserts the configured pre-compiled function block into the netlist which is being assembled.

FIG. 13—Function Block for a Structure Node

FIG. 13 is a block diagram illustrating a While loop function block 582.As shown, the While loop function block 582 includes enabling period andphase inputs as well as a loop control input. The While loop functionblock 582 provides an index output which is provided to an adder 584.The adder 584 operates to increment each time the index signals providedto monitor the number of times the While loop is executed. The Whileloop further outputs Clear and Enable Out signals to control the programwithin the While loop and further receives a Loop Done signal inputwhich is used to indicate whether the loop has completed.

FIG. 14—Operation of Structure Node Function Block

FIG. 14 is a state diagram illustrating operation of the while loopfunction block shown in FIG. 13. As shown, a diagram start operationprecedes to state A. When Phase Done is true indicating that the phasehas completed, then the state machine advances to state B. The statemachine remains in state B until the Loop Enable signal is true,indicating that the loop has been enabled to begin execution. When theLoop Enable signal is asserted, the state machine advances from state Bto state C. In state C the Clear Output signal is asserted, clearing theloop output prior to execution of the loop.

The state machine then advances from state C to state D. In state D thecomputation is performed, and the Set Enable out signal is asserted. Ifthe period is done and the loop is not yet completed, signified by theequation:

Period Done and /Loop Done

then the state machine proceeds to an error state and operationcompletes. Thus, the period set for execution for the loop was notsufficiently long to allow the loop to complete. In other words, theloop took more time to complete than the period set for execution of theloop.

The state machine advances from state D to state E when the Loop Donesignal is asserted prior to the Period Done signal being asserted,indicating that the loop has completed prior to the period allotted forthe loop execution being over.

The state machine then advances from state E to a wait state, as shown.If the period is done and the loop is not re-enabled, signified by thecondition:

Period Done & /Loop Enabled

then the state machine advances from the Wait to the Done state. If theperiod has completed and the loop is still enabled, indicating thatanother execution of the loop is necessary, then the state machineadvances from the Wait state back to the C state. Thus, the statemachine advances through state C, D, E, and Wait to perform loopingoperations.

FIG. 15—Simple Graphical Program Example

FIG. 15 illustrates a simple example of a graphical program. In FIG. 15the graphical program includes three input terminals and one outputterminal. The graphical program simply comprises a first 2-input Addfunction node which receives input from two inputs terminals, and asecond 2-input Add function node which receives the output from thefirst Add function node and receives an output from the third inputterminal. The second 2-input Add function node provides an output tooutput terminal as shown.

FIG. 16—Hardware Result

FIG. 16 is a conceptual diagram of the resulting hardware after thegraphical program example of FIG. 15 is converted into a hardwaredescription. As shown, the hardware diagram includes three writeregisters 522-526 corresponding to each of the three input terminals.The data outputs of the first two write registers 522 and 524 areprovided as inputs to a first two-input adder 532, which corresponds tothe first adder in the block diagram of FIG. 15. The hardwaredescription also involves creating an AND gate 534 which receivescontrol outputs from each of the first two write registers 522 and 524and provides a single output to the control input of the adder 532. Thepurpose of the AND gate 534 is to prevent the adder 532 from executinguntil both inputs have been received.

The Adder 532 provides a data output to a second two-input Adder 542,which corresponds to the second adder in the block diagram of FIG. 15.The first Adder 532 also generates an enable out signal which isprovided to an input of a second AND gate 536. The other input of theAND gate 536 receives an output from the third write register 526,corresponding to the third input terminal. The AND gate 536 provides anoutput to a control input of the second adder 542. Thus, the AND gate536 operates to ensure that the second adder 542 does not execute untilall inputs have been received by the adder 542. The second adder 542provides a data output to a read register 546 associated with the outputterminal. The second adder 542 also provides an enable out signal to theread register 546, which notifies the read register 546 when valid datahas been provided.

Thus, as shown, to create a hardware description for each of the inputterminals, the flowchart diagram of FIG. 6 is executed, which operatesto create a hardware description of a write register 522, 524, and 526,each with data and control outputs. For each adder function node, theflowchart diagram of FIG. 7 is executed, which operates to create ahardware description of an adder 532 or 542, and further creates anassociated N input AND gate 534 or 536, with inputs connected to thedependent inputs of the adder function node to ensure execution at theproper time. Finally, the flowchart diagram of FIG. 8 is executed forthe output terminal of the graphical program, which operates to generatea hardware description of a read register with data and control inputs.

FIGS. 17-19: Example of Converting a Graphical Program into a HardwareImplementation

FIGS. 17-19 comprise a more detailed example illustrating operation ofthe present invention.

FIG. 17 illustrates an example graphical program (a LabVIEW diagram)which is converted into an FPGA implementation using the presentinvention. As shown, the graphical program comprises a plurality ofinterconnected nodes comprised in a While loop. As shown, the While loopincludes shift register icons, represented by the down and up arrows atthe left and right edges, respectively, of the While loop. A 0 constantpositioned outside of the While loop is connected to the down arrow ofthe shift register at the left edge of the While loop.

The While loop includes a timer icon representing or signifying timingfor the While loop. The timer icon includes inputs for period and phase.As shown, the timer icon receives a constant of 1000 for the period andreceives a constant of 0 for the phase. In an alternate embodiment, theWhile loop includes input terminals which are configured to receivetiming information, such as period and phase.

FIG. 18 illustrates the LabVIEW data structures created in response toor representing the diagram or graphical program of FIG. 17. The datastructure diagram of FIG. 17 comprises a hierarchy of data structurescorresponding to the diagram of FIG. 17. As shown, the LabVIEW datastructure representation includes a top level diagram which includes asingle signal connecting the 0 constant to the left hand shift registerof the While loop. Thus the top level diagram includes only the constant(0) and the While loop.

The While loop includes a sub-diagram which further includes left andright shift register terms, the continue flag of the While loop, aplurality of constants, a timer including period and phase inputs,global variables setpoint and gain, sub-VIs a/d read and d/a write, andvarious function icons, e.g., scale, add, subtract, and multiply.Further, each of the objects in the diagram have terminals, and signalsconnect between these terminals.

FIG. 19 illustrates a circuit diagram representing the hardwaredescription which is created in response to the data structures of FIG.18. The circuit diagram of FIG. 19 implements the graphical program ofFIG. 17. As shown, the CPU interface signals are bussed to the globalvariables. Although not shown in FIG. 19, the CPU interface signals arealso provided to the sub-VIs a/d read and d/a write.

The While loop is essentially abstracted to a control circuit whichreceives the period and phase, and includes an external enable directingthe top level diagram to execute, which starts the loop. The loop thenprovides a diagram enable(diag_enab) signal to start the loop and waitsfor a diagram done (diag_done) signal to signify completion of the loop,or the period to expire. Based on the value of the Continue flag, theloop provides a subsequent diag_enab signal or determines that the loophas finished and provides a Done signal to the top level diagram.Although not shown in FIG. 19, the loop control block also provides adiagram clear enable out (diag_clear_enab_out) signal to every node inthe sub-diagram of the While loop. Thus the loop control block outputs adiagram enable (diag_enab) signal that is fed to all of the startingnodes in the diagram within the While loop. The Done signals from theseitems are fed into an AND gate, whose output is provided to enablesubsequent nodes.

The shift register includes a data in, a data out and an enable inputwhich clocks the data in (din) to the data out (dout), and a load whichclocks the initial value into the shift register.

The following is the VHDL description corresponding to the example ofFIGS. 17-19, wherein the VHDL description was created using the presentinvention:

library ieee; use ieee.std_logic_1164.all; entity example0 is  port (  clk: in std_logic;   enable_in : in std_logic;   clr_enable_out : instd_logic;   da_clk: in std_logic;   cpu_clk : in std_logic;   cpu_reset: in std_logic;   cpu_iord : in std_logic;   cpu_iowt : in std_logic;  cpu_devsel : in std_logic;   cpu_ioaddr: in std_logic_vector(31 downto0);   cpu_iodata: in std_logic_vector(31 downto 0);   ad_clk : instd_logic;   enable_out : out std_logic   ); end example0; architectureStructural of example0 is  signal sCLK : std_logic;  signal sda_clk:std_logic;  signal scpu_clk : std_logic;  signal scpu_reset : std_logic; signal scpu_iord : std_logic;  signal scpu_iowt : std_logic;  signalscpu_devsel : std_logic;  signal scpu_ioaddr: std_logic_vector(31 downto0);  signal scpu_iodata: std_logic_vector(31 downto 0);  signal sad_clk: std_logic;  signal s1AC : std_logic_vector(15 downto 0);  signal s115: std_logic; -- node 114 enable_out  constant cE8C : std-logic-vector(15downto 0) := “0000000000000000”; - - 0  signal s114 : std_logic; --diagram done  signal s116 : std_logic; -- diagram clr_enable_out  signals278D : std_logic; -- node 278C enable_out  signal s145 : std_logic; --node 144 enable_out  component shift16   port (    clk: in std_logic;   enable_in, load : in std_logic;    initval : in std_logic_vector(15downto 0);    din: in std_logic_vector(15 downto 0);    dout : outstd_logic_vector(15 downto 0)   );  end component;  signal s1310 :std_logic_vector(15 downto 0);  signal s209C : std_logic_vector(15downto 0);  signal s1344 : std_logic_vector(15 downto 0);  signal s1628: std_logic_vector(15 downto 0);  signal s1270 : std_logic_vector(15downto 0);  signal s1684 : std_logic_vector(15 downto 0);  signal s19CC: std_logic_vector(15 downto 0);  signal s1504 : std_logic_vector(15downto 0);  signal s149C : std_logic_vector(15 downto 0);  signal sC44 :std_logic_vector(31 downto 0);  signal s974 : std_logic_vector(31 downto0);  signal s4D8 : std_logic;  signal s2A1 : std_logic; -- node 2A0enable_out  constant c470 : std_logic := ‘1’;  constant c948 :std_logic_vector(31 downto 0) := “00000000000000000000001111101000”; --1000  constant cCO4 : std_logic_vector(31 downto 0) :=“00000000000000000000000000000000”; -- 0  constant c1960 :std_logic_vector(15 downto 0) := “1111111111111111”; -- −1  signal s2A0: std_logic; diagram done  signal s2A2 : std_logic; -- diagramclr_enable_out  component write_reg   port (    clk : in std_logic;   enable_in: in std_logic;    clr_enable_out : in std_logic;    cpu_clk: in std_logic;    cpu_reset : in std_logic;    cpu_iord: in std_logic;   cpu_iowt: in std_logic;    cpu_devsel : in std_logic;    cpu_ioaddr:in std_logic_vector(31 downto 0);    cpu_iodata: in std_logic_vector(31downto 0);    decodeaddr : in std_logic_vector(3 downto 0);    data :out std_logic_vector(15 downto 0);    enable_out : out std_logic   ); end component;  signal s5BA : std_logic_vector(3 downto 0);  constantc5B8 : std_logic_vector(3 downto 0) := “00”;  signal s1A7E :std_logic_vector(3 downto 0);  constant c1A7C : std_logic_vector(3downto 0) := “10”;  signal s641 : std_logic; -- node 640 enable_out signal s39D : std_logic; -- node 39C enable_out  component a_d_read  port (    clk: in std_logic;    enable_in, clr_enable_out : instd_logic;    ai_read_val : out std_logic_vector(15 downto 0);    ad_clk: in std_logic;    enable_out : out std_logic   );  end component; signal s13A1 : std_logic; -- node 13A0 enable_out  componentprim_Scale_By_Power_Of_2_16   port (    clk : in std_logic;   enable_in, clr_enable_out: in std_logic;    x_2_n : outstd_logic_vector(15 downto 0);    x : in std_logic_vector(15 downto 0);   n : in std_logic_vector(15 downto 0);    enable_out : out std_logic  );  end component;  signal s10E9 : std_logic; -- node 10E8 enable_out component prim_Subtract_16   port (    clk : in std_logic;   enable_in, clr_enable_out : in std_logic;    x_y : outstd_logic_vector(15 downto 0);    y : in std_logic_vector(15 downto 0);   x : in std_logic_vector(15 downto 0);    enable_out : out std_logic  );  end component;  signal s14D1 : std_logic: -- node 14D0 enable_out component prim_Add_16   port (    clk : in std_logic;    enable_in,cir_enable_out : in std_logic;    x_y : out std_logic_vector(15 downto0);    y : in std_logic_vector(15 downto 0);    x : instd_logic_vector(15 downto 0);    enable_out : out std_logic   );  endcomponent;  signal s1A01 : std_logic; -- node 1A00 enable_out  componentprim_Multiply_16   port (    clk : in std_logic;    enable_in,clr_enable_out : in std_logic;    x_y : out std_logic_vector(15 downto0);    y : in std_logic_vector(15 downto 0);    x : instd_logic_vector(15 downto 0);    enable_out: out std_logic   );  endcomponent;  signal s1725 : std_logic; -- node 1724 enable_out  componentd_a_write   port (    clk: in std_logic;    enable_in, clr_enable_out :in std_logic;    a0_write_val : in std_logic_vector(15 downto 0);   da_clk: in std_logic;    enable_out : out std_logic   );  endcomponent;  component whileloop_timed   port (    clk: in std_logic;   enable_in, clr_enable_out : in std_logic;    diag_enable,diag_clr_enable_out: out std_logic;    diag_done : in std_logic;   period : in std_logic_vector(15 downto 0);    phase : instd_logic_vector(15 downto 0);    continue : in std_logic;   enable_out: out std_logic   );  end component; begin  s114 <= s278DAND s145;  s1AC <= cE8C;  nDF8: shift 16   port map(    clk => sCLK,   load => s115,    enable_in => s2A0,    initval => s1AC,    din =>s1344,    dout => s19CC   );  s2A0 <= s1725;  s4D8 <= c470;  s974 <=c948;  sC44 <= cC04;  s1684 <= c1960;  -- setpoint  n5B8: write_reg  port map(    clk => sCLK,    enable_in => s2A1,    clr_enable_out =>s2A2,    enable_out => s5B9,    cpu_clk => scpu_clk    cpu_reset =>scpu_reset,    cpu_iord => scpu_iord,    cpu_iowt => scpu_iowt,   cpu_devsel => scpu_devsel,    cpu_ioaddr => scpu_ioaddr,   cpu_iodata > scpu_iodata,    decodeaddr => s5BA,    data => s149C  );  s5BA <= c5B8;  -- gain  n1A7C: write_reg   port map(    clk =>sCLK,    enable_in => s2A1,    clr_enable_out => s2A2,    enable_out =>s1A7D,    cpu_clk => scpu_clk    cpu_reset => scpu_reset,    cpu_iord =>scpu_iord,    cpu_iowt => scpu_iowt,    cpu_devsel => scpu_devsel,   cpu_ioaddr => scpu_ioaddr,    cpu_iodata => scpu_iodata,   decodeaddr => s1A7E,    data => s1628   );  s1A7E <= c1A7C;  n39C:a_d_read   port map(    clk => sCLK,    enable_in => s2A1,   clr_enable_out => s2A2,    ai_read_val => s1504,    ad_clk => sad_clk   enable_out => s39D   );  n13A0: prim_Scale_By_Power_Of_2_16   portmap(    clk => sCLK    enable_in => s2A1,    clr_enable_out => s2A2,   x_2_n => s1270,    x => s19CC,    n => s1684,    enable_out => s13A1  );  s10E8 <= s39D AND s5B9;  n10E8: prim_Subtract_16   port map(   clk => sCLK,    enable_in => s10E8,    clr_enable_out => s2A2,    xy=> s1310,    y => s1504,    x => s149C,    enable out => s10E9   ); s14D0 <= s13A1 AND s10E9;  n14D0:prim_Add_16   port map(    clk =>sCLK,    enable_in => s14D0,    clr_enable_out => s2A2,    x_y => s1344,   y => s1270,    x => s1310,    enable_out => s14D1   );  s1A00 <=s14D1 AND s1A7D;  n1A00: prim_Multiply_16   port map(    clk => sCLK,   enable_in => s1A00,    clr_enable_out => s2A2,    x_y => s209C,    y=> s1344,    x => s1628,    enable out => s1A01   );  n1724: d_a_write  port map(    clk => sCLK,    enable_in => s1A01,    clr_enable_out =>s2A2,    a0_write_val => s209C,    da_clk => sda_clk,    enable out =>s1725   );  n144: whileloop_timed   port map(    clk => sCLK,   enable_in=> s115,    clr_enable_out => s116,    period => sC44,   phase => s974,    diag_enable => s2A1,    diag_clr_enable_out =>s2A2,    diag_done => s2A0,    continue => s4D8,    enable_out => s145  );  sCLK <= clk;  s115 <= enable_in;  s116 <= clr_enable_out'  s114 <=enable_out;  sda_clk <= da_clk;  scpu_clk <= cpu_clk;  scpu_reset <=cpu_reset;  scpu_iord <= cpu_iord;  scpu_iowt <= cpu_iowt;  scpu_devsel<= cpu_devsel;  scpu_ioaddr <= cpu_ioaddr;  scpu_iodata <= cpu_iodata; sad_clk <= ad clk; end Structural;

Component Library

The preferred embodiment of the present invention includes a componentlibrary that is used to aid in converting various primitives or nodes ina graphical program into a hardware description, such as a VHDL sourcefile. The following provides two examples of VHDL components in thiscomponent library, these being components for a While loop and amultiplier primitive.

1. While Loop Component

The following comprises a VHDL component referred to as whileloop.vhdthat the present invention uses when a While loop appears on a graphicalprogram or diagram. Whileloop.vhd shows how a While loop in a graphicalprogram is mapped to a state machine in hardware. It is noted that othercontrol structures such as a “For loop” are similar. Whileloop.vhd is asfollows:

library ieee; use ieee.std_logic_1164.all; entity whileloop is  port(  clk,   enable_in, -- start loop execution   clr_enable_out reset loopexecution   : in std-logic;   diag_enable, -- start contained diagramexecution   diag_clr_enable_out -- reset contained diagram execution   :out std_logic;   diag_done, -- contained diagram finished   continue --iteration enabled   : in std_logic;   enable_out -- looping complete   :out std_logic  ); end whileloop; architecture rtl of whileloop is  typestate_t is (idle_st, -- reset state     test_st -- check for loopcompletion     calc_st, -- enable diagram execution     end_st -- assertenable_out     );  signal nstate,state : state_t; begin process(state,enable_in,clr_enable_out,diag_done,continue)  begin  diag_clr_enable_out <= ‘0’;   diag_enable <= ‘0’;   enable_out<= ‘0’;  case state is    when idle_st =>    diag_clr_enable_out <= ‘1’;    ifenable_in= ‘1’ then    nstate <= test_st;    else    nstate <= idle_st;end if;    when test_st => diag_clr_enable_out <= ‘1’; if continue= ‘1’then nstate <= calc_st; else nstate <= end_st; end if; when calc_st =>diag_enable <= ‘1’; if diag_done = ‘1’ then nstate <= test_st; elsenstate <= calc st; end if; when end_st => enable_out <= ‘1’; nstate <=end_st; end case; -- Because it appears at the end of the process, thistest -- overrides any previous assignments to nstate if clr_enable_out =‘1’ then nstate <= idle_st; end if; end process; process(clk) begin    if clk‘event and clk=‘1’ then     state <= nstate;     end if;   end process; end rtl;

2. Multiplier Primitive Component

The following comprises a VHDL component referred to asprim_multiply_(—)16.vhd that the present invention uses when amultiplier primitive appears on a graphical program or diagram. Byfollowing the path from enable_in to enable_out, it can be seen how theself-timed logic works—each component asserts enable_out when the dataoutput is valid. Other primitives like “add” or “less than” operate in asimilar manner. Prim_multiply_(—)16.vhd is as follows:

library ieee; use ieee.std_logic_1164.all; entity prim_multiply_16 is port(   clk : in std_logic;   enable_in : in std_logic;  clr_enable_out: in std_logic;   x_y : out std_logic_vector(15 downto0);   x : in stdlogic_vector(15 downto 0);   y : in std_logic_vector(15downto 0);   enable_out : out std_logic   ); end prim_multiply_16;architecture altera of prim_multiply_16 is COMPONENT lpm_mult  GENERIC(LPM_WIDTHA: POSITIVE;   LPM_WIDTHB: POSITIVE;   LPM_WIDTHS: POSITIVE;  LPM_WIDTHP: POSITIVE;   LPM_REPRESENTATION: STRING := “UNSIGNED”;  LPM_PIPELINE: INTEGER := 0   LPM_TYPE: STRING := “L_MULT”   );  PORT(dataa: IN STD_LOGIC_VECTOR(LPM_WIDTHA-1 DOWNTO 0);   datab: INSTD_LOGIC_VECTOR(LPM_WIDTHB-1 DOWNTO 0);   aclr: IN STD_LOGIC := ‘0’;  clock: IN STD LOGIC := ‘0’;   sum: IN STD_LOGIC_VECTOR(LPM_WIDTHS-1DOWNTO 0) := (OTHERS => ‘0’);   result: OUTSTD_LOGIC_VECTOR(LPM_WIDTHP-1 DOWNTO 0)); END COMPONENT;  signal l_x,1_y: std_logic_vector(15 downto 0);  signal l_xy : std_logic_vector(31downto 0);  signal l_enable_in : std_logic; begin  -- synchronize theincoming and outgoing data to guarantee  -- a registered path on datathrough the multiplier  -- register enable_out so it won't assert beforedata is  -- available. process(clk) begin  if clk‘event and clk=‘1’ then  if clr_enable_out=‘1’ then    enable_out <= ‘0’;    l_enable_in <=‘0’;   else    enable_out <= l_enable_in;    l_enable_in <= enable_in;  end if;  l_x <= x;  l_y <= y;  x_y <= l_xy(15 downto 0);  end if; endprocess; gainx: 1pm_mult  GENERIC map(   LPM_WIDTHA => 16,   LPM_WIDTHB=> 16,   LPM_WIDTHS => 1,   LPM_WIDTHP => 32,   LPM_REPRESENTATION =>“UNSIGNED”,   LPM_PIPELINE => 0   ) PORT map(  dataa => l_x,    datab =>l_y,    result => l_xy    ); end altera;

Although the system and method of the present invention has beendescribed in connection with the preferred embodiment, it is notintended to be limited to the specific form set forth herein, but on thecontrary, it is intended to cover such alternatives, modifications, andequivalents, as can be reasonably included within the spirit and scopeof the invention as defined by the appended claims.

What is claimed is:
 1. A computer-implemented method for configuring aninstrument to perform a measurement function, wherein the instrumentincludes a programmable hardware element, the method comprising:creating a graphical program, wherein the graphical program implementsthe measurement function, wherein the graphical program includes a frontpanel portion and a block diagram portion, wherein the front panelportion operates as a front panel for the instrument; generating ahardware description based on the block diagram portion of the graphicalprogram, wherein the hardware description describes a hardwareimplementation of the block diagram portion of the graphical program;configuring the programmable hardware element in the instrumentutilizing the hardware description to produce a configured hardwareelement, wherein the configured hardware element implements a hardwareimplementation of the block diagram portion of the graphical program;compiling the front panel portion into executable code for execution bya processor and storing the executable code in a memory; the instrumentacquiring a signal from an external source after said configuring; theprogrammable hardware element in the instrument executing to perform themeasurement function on the signal; and the processor executing theexecutable code from the memory to present the front panel portion on adisplay during the programmable hardware element in the instrumentexecuting to perform the measurement function on the signal.
 2. Themethod of claim 1, the method further comprising: performing analog todigital conversion on the signal after said acquiring and prior to saidexecuting.
 3. The method of claim 1, the method further comprising:receiving user input to the front panel portion on the display tocontrol the instrument during the programmable hardware element in theinstrument executing to perform the measurement function on the signal.4. The method of claim 3, wherein the front panel portion includes oneor more user interface objects; wherein said generating includesincorporating a register in the hardware description for at least one ofthe user interface objects; wherein the programmable hardware element inthe instrument executing to perform the measurement function on thesignal includes accessing a register on the programmable hardwareelement to affect one of said user interface objects.
 5. The method ofclaim 1, wherein the instrument includes the processor and the memory;wherein the processor in the instrument executes the executable codefrom the memory to present the front panel portion on the display duringthe programmable hardware element in the instrument executing to performthe measurement function on the signal.
 6. The method of claim 1,wherein the instrument is coupled to a computer system, wherein thecomputer system includes the processor and the memory; wherein thecomputer system executes the executable code from the memory to presentthe front panel on the display during the programmable hardware elementin the instrument executing to perform the measurement function on thesignal.
 7. The method of claim 1, wherein the instrument furtherincludes timer/counter logic, the method further comprising: thetimer/counter logic performing one of timing/counting operations duringthe programmable hardware element in the instrument executing to performthe measurement function on the signal.
 8. The method of claim 1,wherein the programmable hardware element in the instrument executes toperform a process control function using the signal.
 9. The method ofclaim 1, further comprising: converting the hardware description into anet list; and compiling the net list format into a hardware programfile; wherein said configuring the programmable hardware elementincludes downloading the hardware program file to the programmablehardware element to configure the programmable hardware element.
 10. Themethod of claim 9, wherein said converting the hardware description intoa net list includes: utilizing at least one function block from alibrary of pre-compiled function blocks; and utilizing hardware targetspecific information.
 11. The method of claim 1, wherein said creatingthe graphical program includes: arranging on the screen a plurality ofnodes comprising the graphical program; creating and storing datastructures which represent the graphical program in response to saidarranging; wherein said generating the hardware description comprises:traversing the data structures; converting the data structures into ahardware description format in response to said traversing.
 12. Themethod of claim 1, wherein the graphical program includes a plurality ofnodes; wherein said generating the hardware description comprisesconverting each of said nodes into a hardware description format. 13.The method of claim 12, wherein each of said nodes is converted into ahardware description format including an enable input, a clock signalinput, and an enable output; wherein, for a respective node, said enableinput receives an enable signal generated from enable out signals fromone or more nodes which provide inputs to the respective node.
 14. Themethod of claim 12, wherein the graphical program includes an inputterminal; wherein, for said input terminal, said converting comprises:determining if data input to the input terminal is from a user interfaceportion executing on the computer system; creating a hardwaredescription of a write register, wherein the write register includes oneor more data outputs and at least control output.
 15. The method ofclaim 12, wherein the graphical program includes a function node;wherein, for said function node, said converting comprises: determininginputs and outputs to/from the function node; generating a hardwaredescription of logic which performs the function indicated by thefunction node; traversing input dependencies of the node; creating ahardware description of an AND gate, including listing connections ofsaid input dependencies of the node to said AND gate.
 16. The method ofclaim 12, wherein the graphical program includes a structure node;wherein, for said structure node, said converting comprises: determininginputs and outputs to/from the structure node; generating a hardwaredescription of a control block which performs the control functionindicated by the structure node; traversing input dependencies of thenode; creating a hardware description of an AND gate, including listingconnections of said input dependencies of the node to said AND gate. 17.The method of claim 12, wherein the graphical program includes an outputterminal; wherein, for said output terminal, said converting comprises:determining if data output from the output terminal is to a userinterface portion executing on the computer system; creating a hardwaredescription of a read register, wherein the read register includes oneor more data inputs and at least control input.
 18. The method of claim1, wherein the graphical program comprises a data flow diagram.
 19. Themethod of claim 1, wherein a first portion of the block diagram portionis converted into a hardware description; the method further comprising:compiling a second portion of the block diagram portion into machinecode for execution by the processor.
 20. The method of claim 19, furthercomprising: executing the machine code to perform functionalityindicated by the second portion of the block diagram portion; theconfigured hardware element performing functionality indicated by thefirst portion of the block diagram portion; wherein said executing themachine code and the configured hardware element performingfunctionality operate to perform functionality indicated by the blockdiagram portion of the graphical program.
 21. The method of claim 1,wherein the instrument includes a non-volatile memory coupled to theprogrammable hardware element, the method further comprising: storingthe hardware description into the non-volatile memory; wherein saidconfiguring the programmable hardware element comprises transferring thehardware description from the non-volatile memory to the programmablehardware element to produce the configured hardware element.
 22. Ameasurement system, comprising: a computer system comprising a CPU,memory and a display; wherein the memory stores a graphical program,wherein the graphical program implements a measurement function, whereinthe graphical program includes a front panel portion and a block diagramportion, wherein the front panel portion operates as a front panel forthe instrument; wherein the memory also stores a software program whichis executable to generate a hardware description based on the blockdiagram portion of the graphical program, wherein the hardwaredescription describes a hardware implementation of the block diagramportion of the graphical program; and an instrument coupled to thecomputer system, wherein the instrument includes: an input for acquiringa signal from an external source; and a programmable hardware element,wherein the programmable hardware element in the instrument isconfigurable utilizing the hardware description to produce a configuredhardware element, wherein the configured hardware element implements ahardware implementation of the block diagram portion of the graphicalprogram, wherein the programmable hardware element in the instrument isexecutable to perform the measurement function on an acquired signal;wherein the computer system is operable to compile the front panelportion of the graphical program into executable code and store theexecutable code in the memory; wherein the CPU in the computer system isoperable to execute the executable code to present the front panelportion on the display while the programmable hardware element in theinstrument executes to perform the measurement function on the signal.23. The measurement system of claim 22, wherein the instrument furthercomprises: analog to digital conversion logic coupled to the input andto the programmable hardware element for performing analog to digitalconversion logic on an acquired analog signal to produce a digitalsignal.
 24. The measurement system of claim 22, wherein the front panelportion is operable to receive user input to control the instrumentduring the measurement function.
 25. The measurement system of claim 22,wherein the instrument further includes timer/counter logic; wherein thetimer/counter logic performs one of timing/counting operations while theprogrammable hardware element in the instrument executes to perform themeasurement function on the signal.
 26. The measurement system of claim22, wherein the programmable hardware element in the instrument executesto perform a process control function using the signal.
 27. Themeasurement system of claim 26, wherein the software program stored inthe memory of the computer system is further operable to convert thehardware description into a net list; wherein the computer system isoperable to configure the programmable hardware element utilizing thenet list.
 28. The measurement system of claim 22, wherein the softwareprogram stored in the memory of the computer system is further operableto compile the net list format into a hardware program file; and whereinthe computer system is operable to download the hardware program file tothe programmable hardware element to configure the programmable hardwareelement.
 29. The measurement system of claim 22, wherein theprogrammable hardware element comprises a field programmable gate array(FPGA).
 30. The measurement system of claim 22, wherein the computersystem includes a bus and also includes one or more expansion slotscoupled to the bus adapted for receiving expansion cards; wherein theinstrument comprises an expansion card inserted into an expansion slotof the bus.
 31. The measurement system of claim 22, wherein theinstrument is an external instrument coupled to the computer system. 32.The measurement system of claim 22, wherein the memory of the computersystem stores a graphical programming system for creation of thegraphical program; wherein the graphical programming system isexecutable to arrange on the screen a plurality of nodes comprising thegraphical program in response to user input; wherein the graphicalprogramming system is further executable to create and store datastructures which represent the graphical program in response to saidarranging; wherein the software program is executable to traverse thedata structures and convert the data structures into a hardwaredescription format in response to said traversing.
 33. The measurementsystem of claim 22, wherein a first portion of the block diagram portionis converted into a hardware description; wherein the computer system isoperable to compile a second portion of the block diagram portion intomachine code for execution by the CPU.
 34. The measurement system ofclaim 33, wherein the configured hardware element is operable to performfunctionality indicated by the first portion of the block diagramportion; wherein the computer system is operable to execute the machinecode to perform functionality indicated by the second portion of theblock diagram portion; wherein said executing the machine code and theconfigured hardware element performing functionality operate to performfunctionality indicated by the block diagram portion of the graphicalprogram.
 35. The measurement system of claim 22, wherein the instrumentincludes a non-volatile memory coupled to the programmable hardwareelement; wherein the non-volatile memory is operable to store thehardware description; wherein the non-volatile memory is operable totransfer the hardware description to the programmable hardware elementto produce the configured hardware element.
 36. The measurement systemof claim 22, wherein the instrument performs data acquisition/generationfunctions.
 37. The measurement system of claim 22, wherein theinstrument is a GPIB instrument.
 38. The measurement system of claim 22,wherein the instrument is a VXI instrument.
 39. The measurement systemof claim 22, wherein the instrument is a serial instrument.
 40. Themeasurement system of claim 22, wherein the instrument is a programmablelogic controller (PLC).
 41. The measurement system of claim 22, whereinthe instrument is a fieldbus device.
 42. A measurement system,comprising: a computer system comprising a CPU, memory and a display;wherein the memory stores a graphical program, wherein the graphicalprogram implements a measurement function, wherein the graphical programincludes a front panel portion and a block diagram portion, wherein thefront panel portion operates as a front panel for the instrument;wherein the memory also stores a software program which is executable togenerate a hardware description based on the block diagram portion ofthe graphical program, wherein the hardware description describes ahardware implementation of the block diagram portion of the graphicalprogram; an instrument coupled to the computer system, wherein theinstrument includes: an input for acquiring a signal from an externalsource; a processor; a memory coupled to the processor; and aprogrammable hardware element, wherein the programmable hardware elementin the instrument is configurable utilizing the hardware description toproduce a configured hardware element, wherein the configured hardwareelement implements a hardware implementation of the block diagramportion of the graphical program, wherein the programmable hardwareelement in the instrument is executable to perform the measurementfunction on an acquired signal; wherein the front panel portion of thegraphical program is operable to be compiled into executable code andstored in the memory of the instrument; wherein the processor in theinstrument is operable to execute the executable code to present thefront panel portion on the display while the programmable hardwareelement in the instrument executes to perform the measurement functionon the signal.
 43. The measurement system of claim 42, wherein theinstrument further comprises: analog to digital conversion logic coupledto the input and to the programmable hardware element for performinganalog to digital conversion logic on an acquired analog signal toproduce a digital signal.
 44. The measurement system of claim 42,wherein the front panel portion is operable to receive user input tocontrol the instrument during the measurement function.
 45. Themeasurement system of claim 42, wherein the instrument further includestimer/counter logic; wherein the timer/counter logic performs one oftiming/counting operations while the programmable hardware element inthe instrument executes to perform the measurement function on thesignal.
 46. The measurement system of claim 42, wherein the programmablehardware element in the instrument executes to perform a process controlfunction using the signal.
 47. The measurement system of claim 46,wherein the software program stored in the memory of the computer systemis further operable to convert the hardware description into a net list;wherein the computer system is operable to configure the programmablehardware element utilizing the net list.
 48. The measurement system ofclaim 42, wherein the software program stored in the memory of thecomputer system is further operable to compile the net list format intoa hardware program file; and wherein the computer system is operable todownload the hardware program file to the programmable hardware elementto configure the programmable hardware element.
 49. The measurementsystem of claim 42, wherein the programmable hardware element comprisesa field programmable gate array (FPGA).
 50. The measurement system ofclaim 42, wherein the computer system includes a bus and also includesone or more expansion slots coupled to the bus adapted for receivingexpansion cards; wherein the instrument comprises an expansion cardinserted into an expansion slot of the bus.
 51. The measurement systemof claim 42, wherein the instrument is an external instrument coupled tothe computer system.
 52. The measurement system of claim 42, wherein thememory of the computer system stores a graphical programming system forcreation of the graphical program; wherein the graphical programmingsystem is executable to arrange on the screen a plurality of nodescomprising the graphical program in response to user input; wherein thegraphical programming system is further executable to create and storedata structures which represent the graphical program in response tosaid arranging; wherein the software program is executable to traversethe data structures and convert the data structures into a hardwaredescription format in response to said traversing.
 53. The measurementsystem of claim 42, wherein a first portion of the block diagram portionis converted into a hardware description; wherein the computer system isoperable to compile a second portion of the block diagram portion intomachine code for execution by the CPU.
 54. The measurement system ofclaim 53, wherein the configured hardware element is operable to performfunctionality indicated by the first portion of the block diagramportion; wherein the computer system is operable to execute the machinecode to perform functionality indicated by the second portion of theblock diagram portion; wherein said executing the machine code and theconfigured hardware element performing functionality operate to performfunctionality indicated by the block diagram portion of the graphicalprogram.
 55. The measurement system of claim 42, wherein the instrumentincludes a non-volatile memory coupled to the programmable hardwareelement; wherein the non-volatile memory is operable to store thehardware description; wherein the non-volatile memory is operable totransfer the hardware description to the programmable hardware elementto produce the configured hardware element.
 56. The measurement systemof claim 42, wherein the instrument performs data acquisition/generationfunctions.
 57. The measurement system of claim 42, wherein theinstrument is one of: a GPIB instrument, a VXI instrument, or a serialinstrument.
 58. The measurement system of claim 42, wherein theinstrument is a programmable logic controller (PLC).
 59. The measurementsystem of claim 42, wherein the instrument is a fieldbus device.